package com.wanma.recuit.service.impl;

import com.github.pagehelper.PageInfo;
import com.wanma.recuit.mapper.*;
import com.wanma.recuit.pojo.*;
import com.wanma.recuit.service.ResumeService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;


@Service
@Transactional(rollbackFor = Exception.class)
public class ResumeServiceImpl implements ResumeService{
    @Resource
    private ResumeMapper resumeMapper;

    @Resource
    private UserMapper userMapper;

    @Resource
    private ExpectationMapper expectationMapper;

    @Resource
    private WorkExperienceMapper workExperienceMapper;

    @Resource
    private EduExperienceMapper eduExperienceMapper;

    @Override
    public void insert(Resume object) {

    }

    @Override
    public void delete(Integer id) {

    }

    @Override
    public void delete(String ids) {

    }

    @Override
    public void update(Resume object) {

    }

    @Override
    public Resume findById(Integer id) {
        System.out.println(id+"0000000000");
        Resume resume = resumeMapper.selectResumeByUserId(id);
        return resume;
    }

    @Override
    public List<Resume> findAll() {
        return null;
    }

    @Override
    public PageInfo<Resume> findPage(int pageNum, int pageSize) {
        return null;
    }

    @Override
    public void updateIntroduction(String introduce,Integer userId) {
        resumeMapper.updateIntroduction(introduce,userId);
    }

    @Override
    public void updateUser(User user) {
        userMapper.updateUser(user);
    }

    @Override
    public void insertExpectation(Expectation expectation) {
        expectationMapper.insert(expectation);
    }

    @Override
    public void insertWorkExperience(WorkExperience workExperience) {
        workExperienceMapper.insert(workExperience);
    }

    @Override
    public void insertEduExperience(EduExperience eduExperience) {
        eduExperienceMapper.insert(eduExperience);
    }

    @Override
    public void updateUpdateTime(Integer id) {
        resumeMapper.updateUpdateTime(id);
    }


}

